<template>
  <el-table
    :data="source"
    height="calc(100vh - 140px)"
    style="min-width: 100%"
    @row-click="handleStroke"
  >
    <el-table-column
      prop="clientName"
      min-width="80px"
      label="当事人"
      header-align="center"
      align="center"
    ></el-table-column>
    <el-table-column
      prop="clientGroup"
      min-width="50px"
      label="班组"
      header-align="center"
      align="center"
      v-if="!lite"
    ></el-table-column>
    <el-table-column
      prop="clientOffice"
      min-width="100px"
      label="科室"
      header-align="center"
      align="center"
      v-if="!lite"
    ></el-table-column>
    <el-table-column prop="time" min-width="160px" label="时间" header-align="center" align="center"></el-table-column>
    <el-table-column prop="type" label="类型" min-width="50px"></el-table-column>
    <el-table-column prop="category" min-width="100px" label="项目"></el-table-column>
    <el-table-column prop="value" label="分数" min-width="50px"></el-table-column>
    <el-table-column label="内容" min-width="200px">
      <template slot-scope="scope">
        {{JSON.parse(scope.row.remark).join("，")}}
      </template>
    </el-table-column>
    <el-table-column prop="comment" label="描述" min-width="200px" v-if="!lite"></el-table-column>
    <el-table-column
      prop="userName"
      label="提交人"
      min-width="100px"
      v-if="!lite"
      header-align="center"
      align="center"
    ></el-table-column>
  </el-table>
</template>

<script>
export default {
  props: {
    lite: { type: Boolean, required: false, default: false },
  },
  computed: {
    source() {
      return this.$store.state.query.sourceInspect;
    },
  },
  methods: {
    handleStroke(row) {
      this.$emit("rowSelected", row);
    },
  },
};
</script>
